#include "../include/ELCourse.h"
#include "../include/Student.h"
using namespace std;

ELCourse::ELCourse(std::string name, int grade, int semester) :
	Course(name, grade, semester,"EL") {

}

ELCourse::~ELCourse() {
	regStudents.erase(regStudents.begin(), regStudents.end());
}

void ELCourse::reg(Student &s) {


		if (cur_sem >= semester && semester >= s.getSem() && s.getELtodo()>0 && s.isSucc()) {
			regStudents.push_back(&s);
			s.useELtodo();

		}

}
